import { Entry } from "@/types/intro";
import { MenuOption } from "naive-ui";

export function entriesConvertToMenuOptions(entries: Entry[]): MenuOption[] {
    entries.sort((a, b) => a.rank - b.rank);

    return entries.map((entry) => ({
        label: entry.name,
        key: entry.id,
    }));
}
